UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'mZrl/n8MWYJaRvP856iVTTgZr7BeBB8QhGVUyxECk3k='
WHERE
key_id = 'f20754ea0999c39b7def5d076876cb05ae7471beb453e8a0895d35655b707a7c'
AND (
token = 'mZrl/n8MWYJaRvP856iVTTgZr7BeBB8QhGVUyxECk3k='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)