UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '4ZhGFG/6StgwGyfGK/nhICyNh9OJHTIyCdjlT5f6z/c='
WHERE
key_id = '7c65b18c37c86a08765d9478bb5ee0d5744e77aa88bf2ff1881edfedd07f8c70'
AND (
token = '4ZhGFG/6StgwGyfGK/nhICyNh9OJHTIyCdjlT5f6z/c='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)