UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/aUOsT3Ydt3fQIGgGE8Y2N1eKk98+QVgU4rlYFvTXlU='
WHERE
key_id = '2a7884e23cbb88853e3c7551a3285fbbd13be6b488be3d892b91504661f87225'
AND (
token = '/aUOsT3Ydt3fQIGgGE8Y2N1eKk98+QVgU4rlYFvTXlU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)