UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Fd+aJd4An0zy+u0wijbmI3IYSKJXyDWCqdf0MXJ/hos='
WHERE
key_id = '4cd4e5bd7b42ded380c1476f22df837ae4c49cfbb3fe37c6bbdcaa8ac9ee9132'
AND (
token = 'Fd+aJd4An0zy+u0wijbmI3IYSKJXyDWCqdf0MXJ/hos='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)