UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'l1V2C78k3S2uz5OE+i2KnkRuv4t9U0wtpPUqByT8DcA=' 
WHERE 
  key_id = '54528064f7abdd62db2666a236783167ecd69ceacb67c650299827ca97c25c42' 
  AND (
    token = 'l1V2C78k3S2uz5OE+i2KnkRuv4t9U0wtpPUqByT8DcA=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00023