UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '7WoPnIf+iqmLPBMmD8jvD/Rl+BLKtosTmjXdl36OqdY='
WHERE
key_id = '8095ca1af28932ed5a24ef7c86902ca597341a2996386a2c8cc4ac32a66a68c2'
AND (
token = '7WoPnIf+iqmLPBMmD8jvD/Rl+BLKtosTmjXdl36OqdY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)