UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '8MXYPNy5TqqJuNhHS+B27UEpD6HAJJ9NHMoQSVz0dLw='
WHERE
key_id = '62c197557567541341cb573d0bc365eb983285dff31c4f248f9fefff29d2292a'
AND (
token = '8MXYPNy5TqqJuNhHS+B27UEpD6HAJJ9NHMoQSVz0dLw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)