UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'y2f0zIUdc422/I8wszLnsAZ/bxOAOMgItJlxRdkuhmY=' 
WHERE 
  key_id = 'fb60175511ec4c7c71fd0ba6f556dba4d7158e2a7584936fdf8b7e2726606234' 
  AND (
    token = 'y2f0zIUdc422/I8wszLnsAZ/bxOAOMgItJlxRdkuhmY=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00024