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

Query time 0.00036