UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'xOohd74PH/WADpH+bkAhXD1TU7/YKGFzCjF9fQ++ob4=' 
WHERE 
  key_id = 'e0ef0275703133be1882801b6d183e1a161a0a62f7bda6967710ea06a7513525' 
  AND (
    token = 'xOohd74PH/WADpH+bkAhXD1TU7/YKGFzCjF9fQ++ob4=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00019