UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'QBzvdRFGgSehs2fnD7KfZmcH73toCS0oakFtVVsneu0='
WHERE
key_id = '53a9e376d2ce8b0523af5b035ec42b0d49f2dc08e35cd6b93ea15076e15c8d91'
AND (
token = 'QBzvdRFGgSehs2fnD7KfZmcH73toCS0oakFtVVsneu0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)