UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'jB73TDDNz/hSv8bRMkbrQW0ZOHXYf4Ft27ejEuqUFso='
WHERE
key_id = '4f9e4865d1ef0ed1c9f35304557a81aa74d21280f3b269a3d5797ccf37df5fb2'
AND (
token = 'jB73TDDNz/hSv8bRMkbrQW0ZOHXYf4Ft27ejEuqUFso='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)