UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'ZKhGW1QMRR+ONTklXmeO6IFqb4vNUJqiDGILXGDaXig='
WHERE
key_id = 'eedce78ff3f638a78d5b0aaccd5948c1ff3723315ec913b66acfab0794821c5a'
AND (
token = 'ZKhGW1QMRR+ONTklXmeO6IFqb4vNUJqiDGILXGDaXig='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)