UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'sD9qBdHh1WIsAJpZkLZt5sW3tCLWfmdtAikvjYn7A6I=' 
WHERE 
  key_id = '5fcbe5455e582eb4cdd6abcd3acef4b2e499030d982bf918d28af5975417ecc4' 
  AND (
    token = 'sD9qBdHh1WIsAJpZkLZt5sW3tCLWfmdtAikvjYn7A6I=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00027