UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'D+/DK33/XkuIv2rcW/EtJqM40WqI7FoQOM3tURldc40='
WHERE
key_id = '961df4ba462fbf254cb648a2716b7346729359799ef94bab48c3d7bdb4cb5be6'
AND (
token = 'D+/DK33/XkuIv2rcW/EtJqM40WqI7FoQOM3tURldc40='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)