UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '0uMtUMkLwoDaZGGJ93fJINy0rX/d1zMkdfrew2LK/Tk='
WHERE
key_id = '6aaa3f9e047c1844924440bbb3d65739ecc40f78cad9b120dc967ce5d7b30660'
AND (
token = '0uMtUMkLwoDaZGGJ93fJINy0rX/d1zMkdfrew2LK/Tk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)