UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'H5i/s2y1N6TkublfIQaS9MeM5B1+UtxUafMRPn2eHJQ='
WHERE
key_id = '476ea34f08207f876611c4054cfe1ed9980b4f03a6cfdc21154a506c526cda3f'
AND (
token = 'H5i/s2y1N6TkublfIQaS9MeM5B1+UtxUafMRPn2eHJQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)