UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'sncushyRs/Su6kkrWFZfKOW+LoBLXDKAb+UE8jfasG0=' 
WHERE 
  key_id = 'a69873bf3d57d50bc93f7789a3cb54b17ad09cfe078d1cbcbcf307dc301ec0f6' 
  AND (
    token = 'sncushyRs/Su6kkrWFZfKOW+LoBLXDKAb+UE8jfasG0=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00020