UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'Wq0G3DZ53AgtS+iXj8Xc90b3ZIMP0KU3ZIUfzu0nF78=' 
WHERE 
  key_id = '71b1778ef0b424edc8559e8aad92110542ef087e4f264fe05476504b22b91176' 
  AND (
    token = 'Wq0G3DZ53AgtS+iXj8Xc90b3ZIMP0KU3ZIUfzu0nF78=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00029