UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+IE2eVUw5SCYWe9Y95NK1l4UTEbhutMCOufzTz84n7M='
WHERE
key_id = '86bc5a989ceaf71fbe121c92ba29d2cc3c318426d728670f060a3878d7ee68e7'
AND (
token = '+IE2eVUw5SCYWe9Y95NK1l4UTEbhutMCOufzTz84n7M='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)