UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'p5E+gIt6crenvYaLg5BtPRaRiVsS4o17866zVXHFM8c=' 
WHERE 
  key_id = '3fa00a2663a5d9c5970af0aa4f8ed00adc7fb85590a5e332c9232703b5631af3' 
  AND (
    token = 'p5E+gIt6crenvYaLg5BtPRaRiVsS4o17866zVXHFM8c=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00029