UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'JemTchbVI4xSa9EoU4QdbDg/g9vs8OnkIZUsdPTiPmM='
WHERE
key_id = '35a79daac28330d97fa2b22ad94409616d65e672045c00fd62c5f1820c8b5e78'
AND (
token = 'JemTchbVI4xSa9EoU4QdbDg/g9vs8OnkIZUsdPTiPmM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)