UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '2HJX71XGRwjeS3VmF5a2tEMD96K92DQXVSucS8i/SAQ='
WHERE
key_id = 'd603b10c66d4b0e4062089513197ddfc85f09ae8359cf4fc25ede5884375a886'
AND (
token = '2HJX71XGRwjeS3VmF5a2tEMD96K92DQXVSucS8i/SAQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)