UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '9uojVsKTluvHCVU5G3LaaUFEhZRAuUDcfSxmI9nVgyI=' 
WHERE 
  key_id = '1cab6e6939cbb5606f69de2c0dd9bde263b16a620530086c443e6ad1b34b5f63' 
  AND (
    token = '9uojVsKTluvHCVU5G3LaaUFEhZRAuUDcfSxmI9nVgyI=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00018