UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'LC4KjzzT3tK6sZFKWUgKhidz5XFqoLNwt9HYUlR2oRQ='
WHERE
key_id = '9dd6bb3964e12283a290b665848ab07d074748ae4967862bf57c6bc02560f898'
AND (
token = 'LC4KjzzT3tK6sZFKWUgKhidz5XFqoLNwt9HYUlR2oRQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)