UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '3DGPVac6/REHagJ5BkzgN3107TIx/YJ4DrFp4SLGulc='
WHERE
key_id = '2548fa96cc2999cf3b3f44e7e32d09d4df48377a0e02a0a26193334eaa974ebb'
AND (
token = '3DGPVac6/REHagJ5BkzgN3107TIx/YJ4DrFp4SLGulc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)