UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Xrq7clPLGMbcTv+oWq+B/SUgflu7Psn3DNyi5UyK4Ww='
WHERE
key_id = '26b1f7318fc909db79c0d01b56b93452de9e8620e3c174e87a6da90fb1bbf658'
AND (
token = 'Xrq7clPLGMbcTv+oWq+B/SUgflu7Psn3DNyi5UyK4Ww='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)