UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'bNkxSsRAcSghRN4eVhMcFigqTMPDWWZr/bPiWkW8p0c=' 
WHERE 
  key_id = '0011f0fcff518df7a64f10391e7a17a0a23e0d5f2ed4f38b6b8f33cbd7509d1c' 
  AND (
    token = 'bNkxSsRAcSghRN4eVhMcFigqTMPDWWZr/bPiWkW8p0c=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00031