UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'VzI9dAOwmi4+R+Kac05/PQFdqBvbQSUBT5Y2b1WY50E=' 
WHERE 
  key_id = 'e49772748f079780b10d4836e1c354be293ae03db263917609a3726b2e611ea8' 
  AND (
    token = 'VzI9dAOwmi4+R+Kac05/PQFdqBvbQSUBT5Y2b1WY50E=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00023