UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'hgSPu8PYWtHxx/0y3wcmLy4NtqIHUxaeRsSZm5Q/Wko='
WHERE
key_id = '843e8611b3deb222e8567ece8d10ad4a780e9a027dcc8fd5c03dc46df7f5e95c'
AND (
token = 'hgSPu8PYWtHxx/0y3wcmLy4NtqIHUxaeRsSZm5Q/Wko='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)