UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'AkuCZG/lyq7TVIZlYtxBcE5zyIEVQigOHNGNbFdTFyc=' 
WHERE 
  key_id = 'cde06b23227f408e4014e36e5453a203a1997f322cb5901ba2a355e131e210b5' 
  AND (
    token = 'AkuCZG/lyq7TVIZlYtxBcE5zyIEVQigOHNGNbFdTFyc=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00039