UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'ncgE+sQd2HyLzhcsQbIfHZlQK4vlF7XmTtzdEghDe4o='
WHERE
key_id = '72b4695e500ede2ac7cfd131751825f79a46b797eaadc0f6d3356803ec0c5779'
AND (
token = 'ncgE+sQd2HyLzhcsQbIfHZlQK4vlF7XmTtzdEghDe4o='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)