UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'tO6XLronqXz79GVlkOyfeorfmvAOzGE93h34982UjHM='
WHERE
key_id = 'b433c1780576abda4e7553653f7c0960736d5581370ae7163961bef51de1f6f2'
AND (
token = 'tO6XLronqXz79GVlkOyfeorfmvAOzGE93h34982UjHM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)