UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '9tTATE26SLg1HP7AkUHK+4k+zsKDEymo8UmL37K14qk='
WHERE
key_id = 'f0fcc0e1de93c0fa47b7b611fe51187dd3e2fdc5e3d59568773a74b2608275ac'
AND (
token = '9tTATE26SLg1HP7AkUHK+4k+zsKDEymo8UmL37K14qk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)