UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'zRDgc66i4RNqcfzLfGX53QhoKpKh7DMvatawALCUQYQ='
WHERE
key_id = '69976044869b1db083b3bcf3e2aafec165595ae0ec7829d7f64b62800a00c39b'
AND (
token = 'zRDgc66i4RNqcfzLfGX53QhoKpKh7DMvatawALCUQYQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)