UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/u7BZ7/y6kFszWoZnDt6CblRVpOVg8cPp1mUN3CWSU0='
WHERE
key_id = '2d5753e97f0ace6dbca96a99b2632f3e60c75233b560f80bc6f65521f6f27fe2'
AND (
token = '/u7BZ7/y6kFszWoZnDt6CblRVpOVg8cPp1mUN3CWSU0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)