UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '0v/yDZ55p2qFSLcbV9SitDAXsWV8AnXtgXWuxSQs2l0='
WHERE
key_id = 'dce8e3ffeaa6cd53ce661ad1f6de4c9fd9546bc3b911aab63ebed4f76442ad1d'
AND (
token = '0v/yDZ55p2qFSLcbV9SitDAXsWV8AnXtgXWuxSQs2l0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)