UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'ZqpC28EtFb1/vnMylL0eKlrw4pk3+/MIWhntCbzzeJM=' 
WHERE 
  key_id = '0e63f17001f644d24f44df398eb03dcefd71f290bd5d95c5302d645614b7809e' 
  AND (
    token = 'ZqpC28EtFb1/vnMylL0eKlrw4pk3+/MIWhntCbzzeJM=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00015