UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'tTbRWWc0UngSk0pFtZSEhpAJlXbdfj7H/2Rb34OMzCk='
WHERE
key_id = '3b075ed056a72662f82da255d1cc5872744a762a3d7e5ad24f8de9c9dd0e259e'
AND (
token = 'tTbRWWc0UngSk0pFtZSEhpAJlXbdfj7H/2Rb34OMzCk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)