UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'bA/spiR38A6PRbMapkYIUHHy7hHuqMiFNqSZUqjRt9I=' 
WHERE 
  key_id = '84205abba8a5f44c8ec41e29d2c2bce7fc5ce3e7ecf9ddb98cc584e94c5144b0' 
  AND (
    token = 'bA/spiR38A6PRbMapkYIUHHy7hHuqMiFNqSZUqjRt9I=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00017