UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'nmJv8BUDea1O6hW7osVD3ZDuXVdPhUEjLEIutltPKKA=' 
WHERE 
  key_id = '48190b2af7e656e5ab17818f5df6f8359a4dba29ea20c6762fa2f0f68859b0e6' 
  AND (
    token = 'nmJv8BUDea1O6hW7osVD3ZDuXVdPhUEjLEIutltPKKA=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00045