UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '3z3s0rEltoc/NkSiFWbtn7ZR4bSy+4nIYTV3/FKdnQQ='
WHERE
key_id = '8815bc5273686cfe5f98ce064ef851d530de049f937df283ec6735dbac6779c6'
AND (
token = '3z3s0rEltoc/NkSiFWbtn7ZR4bSy+4nIYTV3/FKdnQQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)