UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'GFMfyQ8fZpOJgSy6+MaL3O7CKnTdgHbrJ+uel4Zbfnc='
WHERE
key_id = '806635fca330e868cbeff9bc3ad0ee0f7a18128af1c5855054b771f7eadc00b5'
AND (
token = 'GFMfyQ8fZpOJgSy6+MaL3O7CKnTdgHbrJ+uel4Zbfnc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)