UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'rHIMxTcbP/JSZsfeHZJ96J4IdTp4IdFfi51KZ/wIyxM='
WHERE
key_id = '23d14a0d0eb616b7d3c10b4eb93c4d302e562cb76a14eff465ab5a3d9171921f'
AND (
token = 'rHIMxTcbP/JSZsfeHZJ96J4IdTp4IdFfi51KZ/wIyxM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)