UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'IJrLa8L961UL5N4XhNeeERergPkX3MyDjjhIU8ZM6CY=' 
WHERE 
  key_id = 'fc1d1b27f1744a580d72af59fb2f75aa07bc7af74869e1b89399bed7eaabd900' 
  AND (
    token = 'IJrLa8L961UL5N4XhNeeERergPkX3MyDjjhIU8ZM6CY=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00027