UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '6kpu5QSmyPr/zUgPSKL2gqPTyUGH51y+1vZzPZuROCM='
WHERE
key_id = 'b17baccdece13a2703235c97bbdbae0b0ba2d70a4e8d3f8f9acde24d5731afc6'
AND (
token = '6kpu5QSmyPr/zUgPSKL2gqPTyUGH51y+1vZzPZuROCM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)