UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'OvvEQ2iWlqd2nrvr8y4Wg0WsdUr7eeM/ciQbZXBpbvo='
WHERE
key_id = 'e13b98a8ba1501c56776d6354d99f84534befd9d69eb79293f297aab98c93f03'
AND (
token = 'OvvEQ2iWlqd2nrvr8y4Wg0WsdUr7eeM/ciQbZXBpbvo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)