UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'vipum+nBx3JOzWKtkX/7TjdxxHVQlaieeTfJUBFPquY='
WHERE
key_id = 'f224bffafc8243a5432c196317dc00f3b388ed97cde6c6b76fb317d75c31646c'
AND (
token = 'vipum+nBx3JOzWKtkX/7TjdxxHVQlaieeTfJUBFPquY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)