UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'ocjK0QaWfxep+ROVJr1SJzK/jEPk/MOpDxJAW+cYjj0='
WHERE
key_id = '72773733913014b54348b8465e10afcc9e1049cc15c7e00a92cfa5e3426415aa'
AND (
token = 'ocjK0QaWfxep+ROVJr1SJzK/jEPk/MOpDxJAW+cYjj0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)