UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'mQJ8uP8sD2Ht9O4BHB+hLUw7GIDBHcTKhNq4Iw2qpPI='
WHERE
key_id = '35f9896130add3896adb851f6cfbf270900c34ac3be2fca8053d5d1473c53186'
AND (
token = 'mQJ8uP8sD2Ht9O4BHB+hLUw7GIDBHcTKhNq4Iw2qpPI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)