UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'iLSDMWcf2CGYGkRaQjJ6/b69smuE0ldKl5HAWBO/SJQ='
WHERE
key_id = 'ff44fdcc88d72b4a2ac42d95741ca5e5764684acaa86ca4dddd354fd80a009d3'
AND (
token = 'iLSDMWcf2CGYGkRaQjJ6/b69smuE0ldKl5HAWBO/SJQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)