UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'SfrfIw4EhEVKlPO8NF/LnIkeCkH1Zvv/0shwSQ44W8E='
WHERE
key_id = 'ef8b7f8a622ac1c2c1f26c6fb05b09412a06840e22ee81c1e6622e73d2ebe047'
AND (
token = 'SfrfIw4EhEVKlPO8NF/LnIkeCkH1Zvv/0shwSQ44W8E='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)