UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '1yMxduC5hJ5MZ97dnk9de1wDhbnsVaOjOM8Uq3qCE+8='
WHERE
key_id = '5356cbf1cc18efe5cb46220ffbd8717bf74f597d5da2a8d70e5f25a1700a809d'
AND (
token = '1yMxduC5hJ5MZ97dnk9de1wDhbnsVaOjOM8Uq3qCE+8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)