UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '13xWVpzMpHSVLW9qT8Qja/DjT/zJ4VJqvQ4V0KdXACs='
WHERE
key_id = '32a4f4e9881f1263ed8b26f779ee03b22edc8e097092a6dd5ba9676761be7b7e'
AND (
token = '13xWVpzMpHSVLW9qT8Qja/DjT/zJ4VJqvQ4V0KdXACs='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)