UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'Q+CJmbcctV1o1qxTeLiLAccig69mp6HvWwLu+OPZ9nI=' 
WHERE 
  key_id = 'd45b51beb5f68c448852462986664e86d73fcc83a88f8152528e881a0a9e2633' 
  AND (
    token = 'Q+CJmbcctV1o1qxTeLiLAccig69mp6HvWwLu+OPZ9nI=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00025