UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '7/HMizTpc7JB2Bn9zWzBApHuEIvcwLCGaQaXLCh0spA='
WHERE
key_id = 'fcb226a9415685a979c63707afc019408a35f1ef572725ff22524c134774e6de'
AND (
token = '7/HMizTpc7JB2Bn9zWzBApHuEIvcwLCGaQaXLCh0spA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)